<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Insert title here</title>
</head>
<body>

<% if(so.isAuthenticated()){ %>
您已经登录.  <a href="/logout">退出</a>
<% }else{ %>
<a href="/login">请登录</a>
<% } %>
<br>
<br>
<br>

<% if(so.hasRole("admin")){ %>
role:admin.
<br>
addUser权限:<% if(so.hasPermission("addUser")){%> true <% } %><br>
showUser权限:<% if(so.hasPermission("showUser")){%> true <% } %><br>
editUser权限:<% if(so.hasPermission("editUser")){%> true <% } %><br>
deleteUser权限:<% if(so.hasPermission("deleteUser")){%> true <% } %><br>
<% } %>

<br>
<% if(so.hasRole("user")) { %>
role: user.
<br>
addUser权限:<% if(so.hasPermission("addUser")){%> true <% } %><br>
showUser权限:<% if(so.hasPermission("showUser")){%> true <% } %><br>
editUser权限:<% if(so.hasPermission("editUser")){%> true <% } %><br>
deleteUser权限:<% if(so.hasPermission("deleteUser")){%> true <% } %><br>
<% } %>
<br>
has user and admin roles: <a href="/userAdmin">check</a><br>
has user or admin role: <a href="/userOradmin">check</a><br>
has admin role: <a href="/admin">check</a><br>
has user role: <a href="/user">check</a><br>
<br>
has addUser Permission <a href="/addUser">check</a><br>

Admin: addUser showUser editUser deleteUser<br>
User: showUser
</body>
</html>